﻿using DG.Tweening;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;

public class SceneTips : MonoBehaviour
{
    Text text;
    
    void Awake()
    {
        text = GetComponent<Text>();
        SceneManager.sceneLoaded += SceneChange;
    }

    private void SceneChange(Scene arg0, LoadSceneMode arg1)
    {
        switch (arg0.name)
        {
            case "Level1":
                text.text ="寂静森林";
                text.color = new Color(1, 1, 1, 0);
                text.DOFade(1,1).SetLoops(2,LoopType.Yoyo);
                break;
            case "Level2":
                text.text = "废弃哨塔";
                text.color = new Color(1, 1, 1, 0);
                text.DOFade(1, 1).SetLoops(2, LoopType.Yoyo);
                break;

        }
    }
}
